﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Is third bit one</title>
    <link href="styles/js-console.css" rel="stylesheet" />
</head>
<body>
    <div id="js-console"></div>
	<script src="scripts/js-console.js"></script>

    <script>
        var number = 8;
        var thirdBit = (number >> 3) & 1;

        if (thirdBit==1) {
            jsConsole.writeLine("The third bit of the number is 1.");
        }
        else {
            jsConsole.writeLine("The third bit of the number is 0.");
        }
    </script>

</body>
</html>
